package com.cytangaa.displaysize;

import android.content.Context;
import android.graphics.Point;
import android.view.Display;

public class DisplaySize {
	Context context;
	
	public DisplaySize(Context c){
		context=c;
	}
	public int[] getDisplaySize(Display display) {
		int width, height=0;
		if (Integer.valueOf(android.os.Build.VERSION.SDK_INT) < 13 ) {
			width = display.getWidth();
			height = display.getHeight();			
		} 
		else {	
			Point size = new Point();
			display.getSize(size);
			width = size.x;
			height = size.y;
			}
		int[] widthHeight = new int[2];
		widthHeight[0]=width;
		widthHeight[1]=height;
		return widthHeight;
		}
	}
